#include "ImageFilterControl.h"


ImageFilterControl::ImageFilterControl()
{
	cntfilters=0;
}

ImageFilterControl::~ImageFilterControl()
{
	
}

unsigned int ImageFilterControl::AddFilter(std::string fname,ImageFilter ffunc)
{
	ImageFilter tmpfilter = 0;
	tmpfilter = base[fname];

	if(!tmpfilter)
	{
		cntfilters++;

		base[fname] = ffunc;
		return 1;
	}
	else
	{
		return 0;
	}
}

ImageFilter ImageFilterControl::GetFFunc(std::string fname)
{
	if(base[fname])
	{
		return base[fname];
	}
	else
	{
		return 0;
	}
}
